<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <div id="demo">
    <h2>1.绑定监听</h2>
    <p></p>
    <p></p>
    <p></p>
    <h3>2.事件修饰符</h3>
    <p>阻止事件默认行为
      <a href="http://www.atguigu.com"  @click.prevent='test1' target="_blank">go硅谷</a>
    </p>
    <p></p>
    <p></p>
    <h3>3.按键修饰符</h3>
    <p></p>
  </div>
  <script src="../js/vue.js"></script>
  <script>
   new Vue({
      data:{

      },
      methods:{
        test1(){
          alert('点我干啥')
        }
      }
   }).$mount('#demo')
  </script>
</body>
</html>